Getting Started with the Internet of Things by Pfister Cuno

Getting Started with the Internet of Things by Pfister Cuno

Author:Pfister, Cuno [Cuno Pfister]
Language: eng
Format: epub, mobi
Tags: COMPUTERS / Web / Web Programming
ISBN: 9781449310110
Publisher: O'Reilly Media
Published: 2011-05-16T16:00:00+00:00


Chapter 11. Handling Sensor Requests

Chapter 10 is an example of an HTTP server, but it doesn’t use any sensors or actuators. In this chapter, I’ll show how you can add sensor access to your server programs (Figure 11-1).

Figure 11-1. Architecture of VoltageMonitor

VoltageMonitor, which you’ll see later in Example 11-1, shows how to handle GET requests to a sensor resource, more specifically one that represents some voltage—e.g., a voltage produced by an attached potentiometer, photo resistor, or similar sensor. You can use any web browser as a client to inspect the current voltage. After all, a web browser is basically an engine for initiating GET requests—and for displaying the responses, of course.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.